package cn.com.surker.pages.console;

import cn.com.surker.common.AbstractController;
import cn.com.surker.system.entity.SysOrigin;
import cn.com.surker.system.entity.SysUser;
import cn.hutool.core.util.ObjectUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Slf4j
@Controller
@RequestMapping("/console/lab")
public class BaseStrengthPageController extends AbstractController {

    /**
     * 标号管理-打开列表页面
     * @return
     */
    @RequestMapping(value = "/strength")
    public ModelAndView controlStorage() {
        ModelAndView view = new ModelAndView();
//        SysUser user = getUser();
//        if (ObjectUtil.isEmpty(user)) {//未登录用户
//            view.setViewName("console/system/login");
//            return view;
//        }
        List<SysOrigin> orgList = getUserOrgList();
        view.addObject("orgList", orgList);
        view.setViewName("console/lab/strengthList");
        return view;
    }
}
